﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Javavaj.iHunter.Viewers
{
    public class HtmlViewer :IViewer
    {
        #region IViewer 成员
        private static string[] docTypes = new string[] { "html", "htm", "asp", "aspx", "php", "jsp" };
        public string[] DocumentTypes
        {
            get {
                return docTypes;
            }
        }

        public System.Windows.Forms.Control CreateControl()
        {
            return new HtmlViewerControl();
        }

        public void ShowDocument(System.Windows.Forms.Control control,string docType, System.IO.Stream doc)
        {
          
            HtmlViewerControl viewerControl = control as HtmlViewerControl;
            if (viewerControl == null)
                return;
            viewerControl.ShowDocument(doc);
        }
        public void PrintDocument(System.Drawing.Graphics g)
        {

        }

        #endregion

        #region IPlugin 成员

        public void InitSettings(System.Xml.XmlDocument settings)
        {

            return;
        }

        public void Config()
        {
            System.Xml.XmlDocument settings = new System.Xml.XmlDocument();
            if (SettingChanged != null)
                SettingChanged.Invoke(this, new Javavaj.iHunter.Core.PluginSettingChangedEventArgs(this, settings));

            return ;
        }
        public event Javavaj.iHunter.Core.PluginSettingChangedEventHandler SettingChanged;


        #endregion




    }
}
